"""
所有的课程名字

"""
from selenium import webdriver
from selenium.webdriver import Keys
from selenium.webdriver.common.by import By
from time import sleep

print('....')
url = 'https://www.freeok.vip/'
print('....')
driver = webdriver.Chrome()
print('....')
driver.get(url)
driver.maximize_window()
#
sleep(3)

"""
home: 首页
Movie: 电影
Tv_series: 电视剧
anime: 动漫
play_tv: 综艺
short_tv: 短剧
child: 少儿
hot_ranking: 热榜
"""
#
all_tv = driver.find_element(By.CLASS_NAME, 'content')
# 查找所有模块
all_lst = all_tv.find_elements(By.CLASS_NAME, 'module')

# 输出所有模块的标题
for module in all_lst:
    module_main = module.find_element(By.CLASS_NAME, 'module-main')
    a_lst = module_main.find_elements(By.TAG_NAME, 'a')
    for a in a_lst:
        print(a.get_attribute('title'))